Skip to content

fix: declare the OpenSSL dependency needed on Linux - #20

Merged
ilitteri merged 1 commit into
mainfrom
fix/linux-openssl-dependency
Aug 26, 2026
Merged

fix: declare the OpenSSL dependency needed on Linux#20
ilitteri merged 1 commit into
mainfrom
fix/linux-openssl-dependency

Conversation

@MegaRedHand

Copy link
Copy Markdown
Contributor

What

Declare openssl@3 and pkgconf as Linux-only dependencies of ethrex.

Why

The Linux source build fails in openssl-sys' build script (run 32897389813, ubuntu-24.04):

The system library `openssl` required by crate `openssl-sys` was not found.
The file `openssl.pc` needs to be installed and the PKG_CONFIG_PATH
environment variable must contain its parent directory.
The PKG_CONFIG_PATH environment variable is not set.

ethrex depends on reqwest with its default TLS backend, native-tls:

openssl-sys v0.9.113
├── native-tls v0.2.18
│   └── hyper-tls v0.6.0 → reqwest v0.12.28 → ethrex

On Linux native-tls is OpenSSL, so openssl-sys gets built and probes for the library with pkg-config. Homebrew's superenv builds PKG_CONFIG_PATH from the formula's declared dependencies, so neither the keg-only openssl@3 nor the pkg-config binary was reachable, even though both were already in the tree as transitive dependencies of the build tools.

On macOS native-tls uses Security.framework and openssl-sys is never built, which is why only the Linux job broke. Scoping the dependencies to on_linux leaves the macOS dependency tree, and the existing arm64_sonoma bottle, untouched.

Notes

  • brew style and brew audit --skip-style pass locally; brew deps on macOS is unchanged.
  • The alternative fix lives upstream in ethrex: switch reqwest to rustls-tls and drop the OpenSSL dependency entirely. Worth doing on its own merits, but it does not help the released 25.0.0 tarball this formula builds.
  • The job that hit this was green. ci: stop a formula that fails to build from reporting a green job #21 makes that kind of failure red.

The Linux source build has been failing in `openssl-sys`' build script:

    The system library `openssl` required by crate `openssl-sys` was not
    found. The file `openssl.pc` needs to be installed and the
    PKG_CONFIG_PATH environment variable must contain its parent directory.

`ethrex` depends on `reqwest` with its default TLS backend, `native-tls`.
On Linux that is OpenSSL, so `openssl-sys` gets built and looks for the
library through `pkg-config`. Neither `pkg-config` nor `openssl@3` was a
declared dependency, so Homebrew's superenv left `PKG_CONFIG_PATH` unset
and the keg-only OpenSSL was invisible even though it was already in the
dependency tree as a transitive dependency.

macOS is unaffected: there `native-tls` uses Security.framework and
`openssl-sys` is never built, which is why only the Linux job broke.
Keeping the dependencies inside `on_linux` leaves the macOS dependency
tree, and its bottle, untouched.
@ilitteri
ilitteri merged commit 1ad61fe into main Aug 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants